
static void vmap_init_nodes()
{
    struct vmap_node *vn;
    int i;

    for_each_vmap_node(vn)
    {
        vn->busy.root = RB_ROOT;
        INIT_LIST_HEAD(&vn->busy.head);
        spin_lock_init(&vn->busy.lock);

        vn->lazy.root = RB_ROOT;
        INIT_LIST_HEAD(&vn->lazy.head);
        spin_lock_init(&vn->lazy.lock);

        for (i = 0; i < MAX_VA_SIZE_PAGES; i++)
        {
            INIT_LIST_HEAD(&vn->pool[i].head);
            WRITE_ONCE(vn->pool[i].len, 0);
        }

        spin_lock_init(&vn->pool_lock);
    }
}
